/*
============================================================================
 Name        : BlockQueryAward.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockQueryAward declaration
============================================================================
*/

#ifndef BLOCKQUERYAWARD_H
#define BLOCKQUERYAWARD_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
// CLASS DECLARATION

class TAwardDrawItem
{
public:
	TBuf<16> m_strLeft;
	TBuf<16> m_strRight;
	TRgb rgbLeft;
	TRgb rgbRight;

};

/**
*  CBlockQueryAward
* 
*/
class CBlockQueryAward : public CBlock
{
public:
	~CBlockQueryAward();

	static CBlockQueryAward* NewL(CBaseBlock* bsBack);

	static CBlockQueryAward* NewLC(CBaseBlock* bsBack);

	CBlockQueryAward(CBaseBlock* bsBack);

public:
	//from CBlock
	void OnDraw(CFbsBitGc& g) const;

	void OnKeyDown(TInt keyCode);

	TBool ReadData(const TDesC8& aData);

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	TInt16 GetDataType();

	void ChangeScrollPos(TInt nPos);
	
	void SizeChanged();
	
protected:
	void BeforeDraw(CFbsBitGc& g) const;
	
private:
	void ConstructL();

	void AddDrawItem(const TDesC& aStrLeft,const TRgb& aRgbLeft,const TDesC& aStrRight, const TRgb& aRgbRight);

private:
	RArray<TAwardDrawItem> m_vDrawItems;
	TInt m_nTotalPoint;
	TInt m_nStart;
};

#endif // BLOCKQUERYAWARD_H
